<?php

class HtmlBlock extends BlockComponent {
    public $id = 'html';

    /**
     * attribute
     * @var string
     */
    public $text;

    public function run(){
        parent::run();

        $this->render($this->outputView);
    }

    /**
     * get class attributes
     * @return type
     */
    public function params() {
        return array(
            'text' => 'Html Content'
        );
    }

    public function validate() {
        if ($this->text == '') {
            $this->errors['html'] = 'HTML content is required';
            return false;
        }
        else
            return true;
    }

}